#pragma once
#include "StubPool.hpp"
#include "Singleton.hpp"

using message::GetChatServerReq;
using message::GetChatServerRsp;
using message::StatusService;

class StatusGrpcClient: public Singleton<StatusGrpcClient>
{
	friend class Singleton<StatusGrpcClient>;
	using StatusStubPool = StubPool<StatusService, StatusService::Stub>;
public:
	~StatusGrpcClient(){_stubPool.reset();}

	GetChatServerRsp GetChatServer(int uid);

private:
	StatusGrpcClient();
	std::unique_ptr<StatusStubPool> _stubPool;
};
